<template>
	<view>
		<u-navbar  title="云课堂"></u-navbar>
		
		<view style="padding-top: 12rpx;width: 100%;display: flex;align-items: flex-start;background: #fff;padding: 36rpx 24rpx;box-sizing: border-box;">
			<view><image src="./myicon/tx.png" style="width: 200rpx;height: 200rpx;"></image></view>
			<view style="flex: 1;display: flex;flex-direction: column;">
				<view style="width:100%;display: flex;align-items: center;padding-left: 20rpx; box-sizing: border-box;">
					<view style="flex: 1;font-size: 32rpx; font-weight: bold;">{{info.userName}}</view>
					<view ><image src="./myicon/kefu.png" style="margin-left: 20rpx; width: 60rpx;height: 60rpx;"></image></view>
					<view ><image src="./myicon/lingdang.png" style="margin-left: 20rpx; width: 60rpx;height: 60rpx;"></image></view>
				</view>
				<view style="width: 100%;display: flex;align-items: center;justify-content: space-between;padding:20rpx; margin-top: 30rpx;">
					<view style="display: flex;align-items: center;justify-content: center;">
						<image src="./myicon/time.png" style="width:30rpx;height: 30rpx;"></image>
						<text>我的学时 {{info.studyHour}}</text>
					</view>
					
					<view style="display: flex;align-items: center;justify-content: center;" @click="goCredit">
						<image src="./myicon/star.png" style="width:30rpx;height: 30rpx;"></image>我的学分 {{info.studyScore}}
					</view>
				</view>
			</view>
		</view>
		<view class="my-center-menu" style="display: flex;flex-direction: column;justify-content: center;background: #FFFFFF;margin-top: 36rpx;padding: 0 24rpx;box-sizing: border-box;font-size: 32rpx;">
			<view style="width: 100%;border-bottom: 1px solid #dedede; height: 112rpx;display: flex;align-items: center;" @click="goMyCourse()">
				<image src="./myicon/my1.png" style="width: 48rpx;height: 48rpx;"></image> 我的课程
			</view>
			<view style="width: 100%;border-bottom: 1px solid #dedede; height: 112rpx;display: flex;align-items: center;">
				<image src="./myicon/my2.png" style="width: 48rpx;height: 48rpx;"></image> 我的考试
			</view>
			<view style="width: 100%;border-bottom: 1px solid #dedede; height: 112rpx;display: flex;align-items: center;" @click="goMyComment()">
				<image src="./myicon/my3.png" style="width: 48rpx;height: 48rpx;"></image> 我的评论
			</view>
			<view style="width: 100%;border-bottom: 1px solid #dedede; height: 112rpx;display: flex;align-items: center;">
				<image src="./myicon/my4.png" style="width: 48rpx;height: 48rpx;"></image> 学习档案
			</view>
			<view style="width: 100%;border-bottom: 1px solid #dedede; height: 112rpx;display: flex;align-items: center;" @click="goMycertificate()">
				<image src="./myicon/my5.png" style="width: 48rpx;height: 48rpx;"></image> 我的证书
			</view>
			
			
		</view>
		<tabs active="4"/>
	</view>
</template>

<script>
	import tabs from '../../components/tabs/tabs.vue'
	export default {
		components:{
			tabs
		},
		data() {
			return {
				info:{}
			}
		},
		onLoad() {
			//var player = new prismplayer({id:"J_prismPlayer",autoplay:false,width:"100%",vid:"${vid}",playauth:"${playAuth}",});
			this.initInfoData()
		},
		methods: {
			initInfoData(){
				this.$util.request('app/classroom/v1/getUserStudyInfo','get',{},true).then(res=>{
					this.info= res.data || {}
					console.log(this.info)
				})
			},
			goMyCourse(){
				uni.navigateTo({
					url:'../course/my/my'
				})
			},
			goMyComment(){
				uni.navigateTo({
					url:'../comment/comment'
				})
			},
			goMycertificate(){
				uni.navigateTo({
					url:'../mycertificate/mycertificate'
				})
			},
			goCredit(){ // 学分明细
				uni.navigateTo({
					url:'../credit/credit'
				})
			}
		}
	}
</script>

<style>

</style>
